package com.crm.manager.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.crm.manager.domain.Configuration;
import com.crm.manager.mapper.ConfigurationMapper;
import com.crm.manager.service.ConfigurationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ConfigurationServiceImpl extends ServiceImpl<ConfigurationMapper,Configuration> implements ConfigurationService {

    @Autowired
    private ConfigurationMapper configurationMapper;

    // 根据类型查询配置信息
    @Override
    public Configuration selectByType(Integer type) {
        return getOne(Wrappers.<Configuration>lambdaQuery().eq(Configuration::getType,type));
    }
}
